import { createBrowserRouter } from 'react-router-dom'
import { lazy } from 'react'
const Layout = lazy(() => import('../pages/layout'))
const Home = lazy(() => import('../pages/home'))
const Message = lazy(() => import('../pages/message'))
const Order = lazy(() => import('../pages/order'))
const My = lazy(() => import('../pages/my'))

export const routerAll = ([
    {
        path: '/index/Home',
        element: <Home />
    },
    {
        path: '/index/Message',
        element: <Message />
    },
    {
        path: '/index/Order',
        element: <Order />
    },
    {
        path: '/index/My',
        element: <My />
    },
])

const routers = createBrowserRouter([
    {
        path: '/index',
        element: <Layout />,
        children: routerAll
    },

])

export default routers